package org.mokusakura.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.sql.Timestamp;

@TableName("verification_table")
public class VerifyCode implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("user_id")
    private Integer userId;
    @TableField("verify_code")
    private String verifyCode;
    @TableField("expiry_time")
    private Timestamp expiryTime;
    @TableField("is_active")
    private boolean isActive;
    @TableField(exist = false)
    private String email;

    public boolean isActive() {
        return isActive;
    }

    public VerifyCode setActive(boolean active) {
        isActive = active;
        return this;
    }

    public Long getId() {
        return id;
    }

    public VerifyCode setId(Long id) {
        this.id = id;
        return this;
    }

    public Integer getUserId() {
        return userId;
    }

    public VerifyCode setUserId(Integer userId) {
        this.userId = userId;
        return this;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public VerifyCode setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
        return this;
    }

    public Timestamp getExpiryTime() {
        return expiryTime;
    }

    public VerifyCode setExpiryTime(Timestamp expiryTime) {
        this.expiryTime = expiryTime;
        return this;
    }

    public String getEmail() {
        return email;
    }

    public VerifyCode setEmail(String email) {
        this.email = email;
        return this;
    }
}
